import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
import { useEffect, useRef, useState } from "react";
import { InfoCircleOutlined } from "@ant-design/icons";
import { Button, Col, Collapse, Form, message, Modal, Progress, Row, Select, Input, } from "antd";
// import DevTreeList from "~/public/cpas-ui/components-ui/express-components/DevListTree";
import "./_style.less";
import { getAllCpasTable, getAllVerifyTypeData, getLeftTreeList, queryDataState, queryResetState, fetchReportList, } from "../ExcelGrid/api/DesignTableApi";
import Dexie from "dexie";
import { DoubleRightOutlined } from "@ant-design/icons";
import { sortCpasTable, ellipsis, formulaResult, formatDataList, RulesType, OPTIONS, RESULT_OPATIONS, } from "./utils";
import PageLoading from "./pageLoading";
import { resetPidIfNotFound, formatPrice, getDataId } from "../../tools/Tools";
import _ from "lodash";
import TreeView from "devextreme-react/tree-view";
import { getCurrentSysName, SystemName, getMergeType, MergeType, } from "../../tools/Tools";
import { renderTable } from "./verifyCommon";
import ValidModal from "./ValidModal";
const { Panel } = Collapse;
const { Search } = Input;
// const  OPTIONS = ['与报表校验', '表内交叉校验', '表内校验', '表间校验'];
// import { dataList as dataListTree } from "./defaultData"
const VerifySummary = ({ dbname, modileIsReturn, type, storageName, title, openVerifyDetail, dataId, activeTabKey, showDetailButtonMenus, }) => {
    const [form] = Form.useForm();
    const treeRef = useRef(null);
    const [selectedItems, setSelectedItems] = useState([]);
    const [isShowOpen, setShowOpen] = useState(false);
    const [resultItems, setResultItems] = useState([]);
    const [reportResult, setReportResult] = useState([]);
    const [mergeReportResult, setMergeReportResult] = useState([]);
    const [reportItem, setReportItem] = useState([]);
    const [dataList, setDataList] = useState([]);
    const [noDataList, setNoDataList] = useState([]); //存储无效公式数据
    const [totalData, setTotalData] = useState({});
    const [noFormulaTotal, setNoFormulaTotal] = useState(0);
    const [otherData, setOtherData] = useState({});
    const [activeKeyArr, setActiveKeyArr] = useState([]);
    const [percentNum, setPercentNum] = useState(0);
    const [contentMsg, setContentMsg] = useState("");
    const [isLoading, setIsLoading] = useState(false);
    const [isReportModalOpen, setReportModalOpen] = useState(false);
    const [isNotesModalOpen, setNotesModalOpen] = useState(false);
    const [reportDataSource, setReportDataSource] = useState([]);
    // const [getDataIds, setDataIds] = useState(null)
    const filteredReportOpation = reportResult.filter((o) => !reportItem.includes(o));
    // const [otherCheck, setOtherCheck] = useState(false)
    const [reportChecks, setReportChecks] = useState([]);
    const [reportInputValue, setReportInputValue] = useState([]);
    const [notesChecks, setNotesChecks] = useState([]);
    const [notesInputValue, setNotesInputValue] = useState([]);
    // const [searchValue, setSearchValue] = useState("");
    const reportTreeView = useRef();
    const notesTreeView = useRef();
    const voildModalRef = useRef();
    const [isClickRerun, setIsClickRerun] = useState(false);
    const sysName = getCurrentSysName();
    // 导出进度条, 和弹出层
    const [exportProcess, setExportProcess] = useState(0);
    const [isShowExportProcess, setIsShowExportProcess] = useState(false);
    const [exportMsg, setExportMsg] = useState("");
    const getCurrentDataId = async () => {
        if (dataId) {
            return dataId;
        }
        else {
            return await getDataId();
        }
    };
    // 附注数据
    const getReportProject = async () => {
        try {
            const dateId = await getCurrentDataId();
            const res = await getLeftTreeList(dateId);
            if (res && res.length) {
                console.log(res, "披露项目数据");
                const data = resetPidIfNotFound(res);
                let mergeData = [];
                const dataTree = data.map((item) => {
                    if (!item.pid && item.associatedReport) {
                        mergeData.push({
                            ...item,
                            id: item.fid,
                            key: item.associatedReport,
                            title: item.associatedReport,
                        });
                    }
                    const obj = {
                        icon: "icon-biaogeyangshiku",
                        parentId: item.pid,
                        // expanded: true,
                        key: item.title,
                        isDirectory: true,
                        ...item,
                    };
                    if (notesChecks && notesChecks.length) {
                        for (let i = 0; i < notesChecks.length; i++) {
                            if (obj.key === notesChecks[i]) {
                                obj.selected = true;
                            }
                        }
                    }
                    return obj;
                });
                setReportResult(dataTree);
                setMergeReportResult(mergeData);
            }
        }
        catch (err) {
            console.log(err, "错误处理");
        }
    };
    // 获取报表项目
    const getReportList = async () => {
        const dateId = await getCurrentDataId();
        const params = {
            dbName: dbname,
            year: dateId,
        };
        const reportList = await fetchReportList(params);
        if (!reportList.ok) {
            return message.error("暂无报表项目!!!");
        }
        else {
            const list = reportList.data.filter((item) => {
                item.key = item.itemName;
                item.title = item.itemName;
                item.id = item.code;
                const children = reportList.data.filter((e) => {
                    e.key = e.itemName;
                    e.title = e.itemName;
                    e.id = e.code;
                    return item.code === e.pCode;
                });
                item.children = children;
                item.items = children;
                return !item.pCode;
            });
            console.log(list, "list---");
            return setReportDataSource(list);
        }
    };
    //报表数据
    const initFsTableData = async () => {
        const fsData = await getAllCpasTable({
            type: "fs",
            dbname,
        });
        if (fsData.success) {
            const newFsData = fsData.data.map((item) => {
                const obj = {
                    ...item,
                    value: item.tid,
                    label: item.name,
                    title: item.name,
                };
                const name = item.name;
                return obj;
            });
            console.log(newFsData, "newFsData---");
            let resData = sortCpasTable(newFsData.slice(0));
            const getCurrentMergeType = getMergeType();
            if (getCurrentMergeType === MergeType.DT_FD) {
                resData = resData.filter((item) => !item.title.includes("未审财务"));
            }
            if (getCurrentMergeType === MergeType.HB_HBYDT ||
                getCurrentMergeType === MergeType.DT_HBYDT) {
                resData = resData.filter((item) => item.title.includes("试算平衡"));
            }
            setReportResult(resData);
        }
        else {
            return message.error("数据加载失败");
        }
    };
    // 汇总数据
    // 重算  获取 汇总数据
    const rerunFun = async () => {
        // eslint-disable-next-line @typescript-eslint/no-use-before-define
        setPercentNum(0);
        // setIsClickRerun(true);
        await setInit();
    };
    const items = [
        {
            label: "追加到EXCEL底稿",
            key: "0",
        },
        {
            label: "输出到EXCEL文件",
            key: "1",
        },
    ];
    const handleChange = (value) => {
        if (value === "open" || value === "") {
            setActiveKeyArr([]);
            dataList.map((item) => {
                const id = item.id ? item.id : item.fid;
                activeKeyArr.push(id);
                setActiveKeyArr([...activeKeyArr]);
            });
        }
        else if (value === "close") {
            setActiveKeyArr([]);
        }
        console.log(`selected ${value}`);
    };
    const changeActiveKey = (id) => {
        setActiveKeyArr(id);
    };
    function groupNumbers(number, groupSize) {
        const groups = [];
        while (number > groupSize) {
            groups.push(groupSize);
            number -= groupSize;
        }
        if (number > 0) {
            groups.push(number);
        }
        return groups;
    }
    function exportElectronFun(path) {
        const el = treeRef.current;
        const elementString = el.outerHTML;
        const main = window.main;
        main.createPdf({ elementString, printPath: path, type: type });
    }
    useEffect(() => {
        const handleCustomEvent = (event) => {
            let { process, msg, status, type: cpasTableType } = event.detail;
            if (cpasTableType === type) {
                process = process * 100;
                console.log("Received message in createPdfProcess:", process);
                console.log("Received message in createPdfProcess:", msg);
                if (status === true && process === 0) {
                    resetExportProcess();
                }
                if (status === true) {
                    setIsShowExportProcess(true);
                    setExportProcess(process);
                    setExportMsg(msg);
                    if (process === 100) {
                        resetExportProcess();
                        return message.success(msg || `导出成功`);
                    }
                }
                else {
                    //如果失败了
                    resetExportProcess();
                    return message.error(msg);
                }
            }
            // 在这里执行 React 组件中的操作，比如更新状态、触发方法等
        };
        document.addEventListener("createPdfProcess", handleCustomEvent);
        return () => {
            document.removeEventListener("createPdfProcess", handleCustomEvent);
        };
    }, []);
    function resetExportProcess() {
        setIsShowExportProcess(false);
        setExportProcess(0);
        setExportMsg("");
    }
    /**
     *  分页的计算方式
     */
    // const exportFun = async () => {
    //   // TODO 分页的时候文字被截断
    //   // 如果想解决这个问题,需要在勾稽汇总界面在 visible：hidden 一个和现有汇总区域一样的界面. 只不过该区域采用平级结构,
    //   // 将分类头和每一条公式拍平成一个List
    //   // 修改分页的算法, 遍历每个 li 元素累加高度, 当大于 pageHeight 则将该元素分割到下一页面去.
    //   // 由于现在是父元素多层嵌套方式, 无法做到按照公式粒度进行分页.
    //
    //   const el = treeRef.current;
    //   const rect = el.getBoundingClientRect();
    //   const pageWidth = 595.28;
    //   const pageHeight = 841.89;
    //   const max = pageHeight * 40;
    //   const rectHeight = rect.height;
    //   const groupsNumber: number[] = groupNumbers(rectHeight, max);
    //   const canvas = [];
    //   let countStep = 0;
    //   for (let i = 0; i < groupsNumber.length; i++) {
    //     const step = groupsNumber[i];
    //     const y = i === 0 ? 0 : countStep;
    //     const canvasElement = await html2canvas(el, {
    //       allowTaint: false,
    //       scale: 1,
    //       useCORS: true,
    //       scrollX: 0,
    //       y: y,
    //       height: step,
    //     });
    //     canvas.push(canvasElement);
    //     countStep += step;
    //   }
    //   try {
    //     // document.querySelector("body")?.appendChild(canvas[0]);
    //     // document.querySelector("body")?.appendChild(canvas[1]);
    //     //内容的总宽度
    //     const contentWidth = rect.width;
    //     //内容的总高度
    //     const contentHeight = rect.height;
    //     //a4纸的尺寸[595.28,841.89],htm1页面生成的canvas在pdf中图片的宽高
    //     //canvas转图片数据
    //     const PDF = new JsPDF(null, "pt", "a4");
    //     console.log(`开始PDF绘制 :  groupsNumber:${groupsNumber}`);
    //     for (let i = 0; i < canvas.length; i++) {
    //       //页面偏移
    //       let position = 0;
    //       //一页pdf显示htm1页面生成的canvas高度，a4纸的尺寸[595.28,841.89];
    //       const canvasElement = canvas[i];
    //       const imgHeight = (pageWidth / contentWidth) * canvasElement.height;
    //       console.log(
    //         `********************** 要绘制的canvas高度 :  imgHeight:${imgHeight} *******************************`
    //       );
    //       let leftHeight = imgHeight;
    //       console.log(`leftHeight高度 :  leftHeight:${leftHeight}`);
    //       const pageData = canvasElement.toDataURL("img/jpeg", 1.0);
    //       if (leftHeight < pageHeight) {
    //         PDF.addImage(pageData, "JPEG", 0, position, pageWidth, imgHeight);
    //       } else {
    //         console.log(
    //           `检测到图像宽度大于pageHeight :  pageHeight:${pageHeight} 开始分页处理`
    //         );
    //         while (leftHeight > 0) {
    //           PDF.addImage(pageData, "JPEG", 0, position, pageWidth, imgHeight);
    //           console.log(
    //             `PDF.addImage : 0, position:${position}, pageWidth:${pageWidth}, imgHeight:${imgHeight} `
    //           );
    //           leftHeight -= pageHeight;
    //           console.log(`leftHeight -= pageHeight leftHeight = ${leftHeight}`);
    //           position -= pageHeight;
    //           console.log(`position -= pageHeight position:${position}`);
    //           if (leftHeight > 0) {
    //             console.log(`添加页面`);
    //             PDF.addPage();
    //           }
    //         }
    //         console.log(
    //           `**********************leftHeight<=0 leftHeight:${leftHeight} 结束本次canvas pdf绘制**************************`
    //         );
    //       }
    //     }
    //
    //     PDF.save(`${title}.pdf`);
    //     setIsLoading(false);
    //   } catch (e) {
    //     throw e;
    //   } finally {
    //     setIsLoading(false);
    //   }
    // };
    const initReloadData = () => {
        // if (localStorage.getItem("dbNameData")) {
        const totalObj = localStorage.getItem(`${storageName}-${dbname}`);
        const newObj = totalObj ? JSON.parse(totalObj) : null;
        if (newObj && dbname === newObj.dbname) {
            setTotalData(newObj.ntotalData);
            setOtherData(newObj.otherInfo);
            if (storageName === "fsNameData") {
                const res = sortCpasTable(newObj.ndataList, "title");
                const { formulars, noFormulas } = formatDataList(res);
                setDataList(formulars);
                setNoDataList(noFormulas);
            }
            else {
                const { formulars, noFormulas } = formatDataList(newObj.ndataList);
                setDataList(formulars);
                setNoDataList(noFormulas);
            }
            const newList = [];
            newObj.ndataList.map((item) => {
                const id = item.id ? item.id : item.fid;
                newList.push(id);
            });
            setActiveKeyArr(newList);
            // }
        }
        else {
            setDataList([]);
            setNoDataList([]);
        }
        // setTypeList(list)
    };
    const onChangeRulesType = (item) => {
        setSelectedItems(item);
        // eslint-disable-next-line @typescript-eslint/no-use-before-define
        reloadData();
    };
    const onChangeReportPro = (item) => {
        // eslint-disable-next-line @typescript-eslint/no-use-before-define
        reloadData();
    };
    const onChangeResult = (item) => {
        // eslint-disable-next-line @typescript-eslint/no-use-before-define
        reloadData();
    };
    //按节点计算总数
    const noteStatisticTotal = (data) => {
        //重新计算总数
        let total = 0; //总数
        let fail = 0; //校验不通过
        let force_fail = 0; //强制不通过
        let not_force_fail = 0; //非强制娇艳不通过
        if (!data || !data.length) {
            return {
                data: [],
                total,
                fail,
                force_fail,
                not_force_fail,
            };
        }
        data.map((item) => {
            const verifyResult = item.verifyResult;
            let sub_total = 0; //总数
            let sub_fail = 0; //校验不通过
            let sub_force_fail = 0; //强制不通过
            let sub_not_force_fail = 0; //非强制娇艳不通过
            let sub_success = 0;
            if (verifyResult && verifyResult.length) {
                verifyResult.map((r) => {
                    if (r?.dynamicType !== "MAIN") {
                        total++;
                        sub_total++;
                        if (!r.fullFormulaResult) {
                            fail++;
                            sub_fail++;
                        }
                        if (r.fullFormulaResult) {
                            sub_success++;
                        }
                        if (!r.fullFormulaResult && r.isForce) {
                            force_fail++;
                            sub_force_fail++;
                        }
                        if (!r.fullFormulaResult && !r.isForce) {
                            not_force_fail++;
                            sub_not_force_fail++;
                        }
                    }
                });
                item["statisticsItem"] = {
                    fail: sub_fail,
                    force_fail: sub_fail,
                    not_force_fail: sub_not_force_fail,
                    success: sub_success,
                    total: sub_total,
                };
            }
        });
        return {
            data,
            total,
            fail,
            force_fail,
            not_force_fail,
        };
    };
    //报表需要排序
    const getSortData = (data) => {
        // if(!data || !data.length) {
        //   return
        // }
        let sortList;
        if (type === "fs") {
            sortList = sortCpasTable(data, "title");
        }
        else {
            sortList = data;
        }
        const { formulars, noFormulas } = formatDataList(sortList);
        if (formulars && formulars.length) {
            sortList = formulars;
        }
        const { data: formlaList, total, fail, force_fail, not_force_fail, } = noteStatisticTotal(sortList);
        const { data: noFormlaList, total: noTotal } = noteStatisticTotal(noFormulas);
        setTotalData({
            ...totalData,
            total,
            fail,
            force_fail,
            not_force_fail,
        });
        setNoFormulaTotal(noTotal);
        setDataList(formlaList);
        setNoDataList(noFormlaList);
    };
    const notesTreeSort = (resetTargetData, oldDataList) => {
        if (!resetTargetData || !resetTargetData.length) {
            return;
        }
        const sourceTreeArr = oldDataList.slice();
        let sort_arr = new Array(oldDataList.length).fill(null);
        console.log(sourceTreeArr, "sourceTreeArr---");
        // 进行位置对比，将勾稽汇总的树。按照源树进行排序
        for (let i = 0; i < resetTargetData.length; i++) {
            for (let j = 0; j < sourceTreeArr.length; j++) {
                if (resetTargetData[i].id === sourceTreeArr[j].id) {
                    sort_arr[j] = resetTargetData[i];
                }
            }
        }
        //过滤掉无用Null占位
        sort_arr = sort_arr.filter((item) => item !== null);
        return sort_arr;
    };
    const reloadData = () => {
        const totalObj = localStorage.getItem(`${storageName}-${dbname}`) || "{}";
        const list = JSON.parse(totalObj);
        const { ndataList } = list;
        const typeItem = form.getFieldsValue().typeList;
        let name = form.getFieldsValue().reportList;
        const rules = form.getFieldsValue().resultList;
        let currentDataList = ndataList && ndataList.length ? ndataList.slice() : [];
        if (type !== "fs" && notesChecks && notesChecks.length) {
            name = notesChecks.slice();
        }
        if (type !== "fs" && (!notesChecks || !notesChecks.length)) {
            name = [];
        }
        if (!ndataList || !ndataList.length) {
            return;
        }
        console.log(name, "披露项目名称", notesChecks);
        if (reportChecks && reportChecks.length) {
            const datas = [];
            for (let i = 0; i < reportChecks.length; i++) {
                ndataList.map((item) => {
                    const result = sysName !== SystemName.MERGE ? reportResult : mergeReportResult; //合并系统的没有报表项目需要用notesTree里面的一级节点数据
                    const currentData = result.filter((r) => r.fid === item.fid); //匹配到数据
                    if (currentData &&
                        currentData.length &&
                        currentData[0].associatedReport) {
                        item.associatedReport = currentData[0].associatedReport;
                        if (item.pid === currentData[0].fid) {
                            //合并系统需要将自节点下的associatedReport手动替换为父节点的报表项目，这样搜素父节点可以找到子节点的数据
                            item.associatedReport = currentData[0].associatedReport;
                        }
                    }
                    if (item.associatedReport &&
                        item.associatedReport.includes(reportChecks[i])) {
                        datas.push(item);
                    }
                });
            }
            console.log([...new Set(datas)], "[...new Set(datas)]---");
            // currentDataList = [...new Set(datas)];
            currentDataList = notesTreeSort([...new Set(datas)], ndataList);
        }
        else {
            currentDataList = ndataList && ndataList.length ? ndataList.slice() : [];
        }
        console.log(currentDataList, "currentDataList---");
        if (!currentDataList || !currentDataList.length) {
            setDataList([]);
            setNoDataList([]);
            return;
        }
        if (typeItem.length > 0 && name.length === 0 && rules.length === 0) {
            const typeList = [];
            currentDataList.map((item) => {
                let res = [];
                item.verifyResult?.map((r) => {
                    if (typeItem.includes(r.type)) {
                        res.push(r);
                    }
                });
                if (res.length) {
                    typeList.push({
                        ...item,
                        verifyResult: res,
                    });
                }
            });
            console.log("执行type", [...new Set(typeList)]);
            getSortData([...new Set(typeList)]);
            // setDataList([...new Set(typeList)])
        }
        if (typeItem.length > 0 && name.length > 0 && rules.length === 0) {
            let datas = [];
            currentDataList.map((item) => {
                let res = [];
                item.verifyResult.map((r) => {
                    if (typeItem.includes(r.type)) {
                        res.push(r);
                    }
                });
                if (res.length) {
                    datas.push({
                        ...item,
                        verifyResult: res,
                    });
                }
            });
            datas = [...new Set(datas)];
            const dataLists = datas.filter((item) => name.includes(item.title));
            console.log("执行type name", dataLists);
            getSortData(dataLists);
            // setDataList(dataLists)
        }
        if ((typeItem.length > 0 && name.length > 0 && rules.length > 0) ||
            (typeItem.length > 0 && name.length === 0 && rules.length > 0)) {
            let datas = [];
            let relesList = [];
            currentDataList.map((item) => {
                let res = [];
                item.verifyResult.map((r) => {
                    if (typeItem.includes(r.type)) {
                        res.push(r);
                    }
                });
                if (res.length) {
                    datas.push({
                        ...item,
                        verifyResult: res,
                    });
                }
            });
            datas = [...new Set(datas)];
            const dataLists = name.length > 0
                ? datas.filter((item) => name.includes(item.title))
                : datas;
            dataLists.map((item) => {
                const newVerifyResult = [];
                item.verifyResult.map((r) => {
                    rules.map((i) => {
                        const isRepeat = newVerifyResult.filter((s) => r.number === s.number);
                        if (i === "1") {
                            if (!r.fullFormulaResult && !isRepeat.length) {
                                // relesList.push(item)
                                newVerifyResult.push(r);
                            }
                        }
                        if (i === "2") {
                            if (!r.fullFormulaResult && r.isForce && !isRepeat.length) {
                                // relesList.push(item)
                                newVerifyResult.push(r);
                            }
                        }
                        if (i === "3") {
                            if (!r.fullFormulaResult && !r.isForce && !isRepeat.length) {
                                // relesList.push(item)
                                newVerifyResult.push(r);
                            }
                        }
                        if (i === "4") {
                            if (r.fullFormulaResultFormat === "2" &&
                                !r.fullFormulaResult &&
                                !isRepeat.length) {
                                // relesList.push(item)
                                newVerifyResult.push(r);
                            }
                        }
                        if (i === "5") {
                            if (r.fullFormulaResultFormat === "1" &&
                                !r.fullFormulaResult &&
                                !isRepeat.length) {
                                // relesList.push(item)
                                newVerifyResult.push(r);
                            }
                        }
                    });
                });
                if (newVerifyResult && newVerifyResult.length) {
                    relesList.push({
                        ...item,
                        verifyResult: newVerifyResult,
                    });
                }
            });
            relesList = [...new Set(relesList)];
            console.log("执行type name rules", relesList);
            getSortData(relesList);
            // setDataList(relesList)
        }
        if (typeItem.length === 0 && name.length > 0 && rules.length === 0) {
            const datalist = currentDataList
                ? currentDataList.filter((item) => name.includes(item.title))
                : null;
            console.log("执行name", datalist);
            getSortData(datalist);
            // setDataList(datalist)
        }
        if (typeItem.length === 0 && name.length > 0 && rules.length > 0) {
            const datalist = currentDataList.filter((item) => name.includes(item.title));
            let nameAndRules = [];
            datalist.map((item) => {
                const newVerifyResult = [];
                item.verifyResult.map((r) => {
                    rules.map((i) => {
                        const isRepeat = newVerifyResult.filter((s) => r.number === s.number);
                        if (i === "1") {
                            if (!r.fullFormulaResult && !isRepeat.length) {
                                // nameAndRules.push(item)
                                newVerifyResult.push(r);
                            }
                        }
                        if (i === "2") {
                            if (!r.fullFormulaResult && r.isForce && !isRepeat.length) {
                                // nameAndRules.push(item)
                                newVerifyResult.push(r);
                            }
                        }
                        if (i === "3") {
                            if (!r.fullFormulaResult && !r.isForce && !isRepeat.length) {
                                // nameAndRules.push(item)
                                newVerifyResult.push(r);
                            }
                        }
                        if (i === "4") {
                            if (r.fullFormulaResultFormat === "2" &&
                                !r.fullFormulaResult &&
                                !isRepeat.length) {
                                // nameAndRules.push(item)
                                newVerifyResult.push(r);
                            }
                        }
                        if (i === "5") {
                            if (r.fullFormulaResultFormat === "1" &&
                                !r.fullFormulaResult &&
                                !isRepeat.length) {
                                // nameAndRules.push(item)
                                newVerifyResult.push(r);
                            }
                        }
                    });
                });
                if (newVerifyResult && newVerifyResult.length) {
                    nameAndRules.push({
                        ...item,
                        verifyResult: newVerifyResult,
                    });
                }
            });
            nameAndRules = [...new Set(nameAndRules)];
            console.log("执行name rules", nameAndRules);
            getSortData(nameAndRules);
            // setDataList(nameAndRules)
        }
        if (typeItem.length === 0 && name.length === 0 && rules.length > 0) {
            console.log(rules, "rules----");
            let relesList = [];
            currentDataList.map((item) => {
                const newVerifyResult = [];
                item.verifyResult.map((r) => {
                    rules.map((i) => {
                        const isRepeat = newVerifyResult.filter((s) => r.number === s.number);
                        if (i === "1") {
                            if (!r.fullFormulaResult && !isRepeat.length) {
                                // relesList.push(item)
                                newVerifyResult.push(r);
                            }
                        }
                        if (i === "2") {
                            if (!r.fullFormulaResult && r.isForce && !isRepeat.length) {
                                // relesList.push(item)
                                newVerifyResult.push(r);
                            }
                        }
                        if (i === "3") {
                            if (!r.fullFormulaResult && !r.isForce && !isRepeat.length) {
                                // relesList.push(item)
                                newVerifyResult.push(r);
                            }
                        }
                        if (i === "4") {
                            if (r.fullFormulaResultFormat === "2" &&
                                !r.fullFormulaResult &&
                                !isRepeat.length) {
                                console.log(r, "r----");
                                // relesList.push(item)
                                newVerifyResult.push(r);
                            }
                        }
                        if (i === "5") {
                            if (r.fullFormulaResultFormat === "1" &&
                                !r.fullFormulaResult &&
                                !isRepeat.length) {
                                // relesList.push(item)
                                newVerifyResult.push(r);
                            }
                        }
                    });
                });
                if (newVerifyResult && newVerifyResult.length) {
                    relesList.push({
                        ...item,
                        verifyResult: newVerifyResult,
                    });
                }
            });
            relesList = [...new Set(relesList)];
            console.log("执行relus", relesList);
            getSortData(relesList);
            // setDataList(relesList)
        }
        if (typeItem.length === 0 && name.length === 0 && rules.length === 0) {
            getSortData(currentDataList);
            // setDataList(ndataList)
        }
    };
    const displayNum = (item, type) => {
        const fixedNum = item.verifyFormulaResult.toFixed(2) -
            item.beVerifiedFormulaResult.toFixed(2);
        const sourceNum = item.verifyFormulaResult - item.beVerifiedFormulaResult;
        const value = type === "verify"
            ? item.verifyFormulaResult
            : item.beVerifiedFormulaResult;
        if (fixedNum === 0 && sourceNum < 0.01 && fixedNum !== sourceNum) {
            return Number(value);
        }
        return formatPrice(value.toFixed(2));
    };
    const formulaList = (t) => {
        if (t.fullFormulaResultFormat === "1") {
            return (_jsx("span", { style: !t.fullFormulaResult ? { color: "#f50" } : {}, children: !t.fullFormulaResult ? "逻辑不符" : "校验通过" }));
        }
        // else if (t.fullFormulaResultFormat === "2") {
        //   return (
        //     <span style={{ color: "#f50", }}>
        //       差异：{formulaResult(t)}
        //       <span style={{ marginLeft: "30px" }}>
        //         {displayNum(t, "beVerify")}
        //         {t.operation}
        //         {displayNum(t, "verify")}
        //       </span>
        //     </span>
        //   )
        // }
        else {
            return (_jsxs("span", { style: !t.fullFormulaResult ? { color: "#f50" } : {}, children: ["\u5DEE\u5F02\uFF1A", formulaResult(t), _jsxs("span", { style: { marginLeft: "30px" }, children: [displayNum(t, "beVerify"), t.operation, displayNum(t, "verify")] })] }));
        }
    };
    /**
     * 平级结构转数树结构
     * @param score
     * @param pid
     */
    function convertLevelToTree(score, pid = null) {
        const tree = [];
        score.map((item) => {
            if (item.pid === pid) {
                // 递归寻找
                item.children = convertLevelToTree(score, item.id);
                tree.push(item);
            }
        });
        return tree;
    }
    /**
     * 按照深度递归的顺序，平铺节点
     */
    const deepTree = (data, arr = []) => {
        for (let i = 0; i < data.length; i++) {
            const item = data[i];
            const clone_item = _.cloneDeep(item);
            delete clone_item.children;
            arr.push(clone_item);
            if (item.children && item.children.length) {
                deepTree(item.children, arr);
            }
        }
        return arr;
    };
    /**
     * 重新排序一下树节点,按照深度递归的顺序，平铺节点
     */
    async function sortTreeByChildren(data) {
        if (!data || !data.length) {
            return [];
        }
        // 从库里查出来的数据会保证同级下的顺序数组，order by pid,orderNumber.
        // 所以直接转成树形结构会保证同级下的顺序
        // 由于数据库里没有存储level层级，所以需要先转成树形结构，再按照深度递归的方式转成平铺的数组
        const dataId = await getCurrentDataId();
        // 获取原树
        const resData = await getLeftTreeList(dataId);
        const sourceTreeArr = [];
        // 按照深度递归平铺原树
        deepTree(convertLevelToTree(resData), sourceTreeArr);
        // 检测无父ID的提升 , 勾稽汇总的树
        const resetTargetData = resetPidIfNotFound(data);
        // 按照原树进行填充位置
        let sort_arr = new Array(sourceTreeArr.length).fill(null);
        // 进行位置对比，将勾稽汇总的树。按照源树进行排序
        for (let i = 0; i < resetTargetData.length; i++) {
            for (let j = 0; j < sourceTreeArr.length; j++) {
                if (resetTargetData[i].id === sourceTreeArr[j].id) {
                    sort_arr[j] = resetTargetData[i];
                }
            }
        }
        //过滤掉无用Null占位
        sort_arr = sort_arr.filter((item) => item !== null);
        return sort_arr;
    }
    const getDataStateHandle = async () => {
        let total = 0;
        await queryResetState({ process: 0, type: "verify" }); //重置重算状态为0
        const timer = setInterval(async () => {
            if (total < 100) {
                const res = await queryDataState({ type: "verify" });
                console.log(res);
                total = parseInt(res.data.process);
                setPercentNum(total);
                setContentMsg(res.data.message);
                console.log(total, "total--------");
                if (res.ok && total === 100) {
                    await queryResetState({ process: 0, type: "verify" });
                    clearInterval(timer);
                    console.log("clearInterval");
                }
            }
        }, 100);
    };
    const setInit = async () => {
        setShowOpen(true);
        await getDataStateHandle();
        const dateId = await getCurrentDataId();
        const params = {
            dbname,
            data_id: dateId,
            type: "vs",
        };
        if (type === "fs") {
            params["cpasTableType"] = type;
        }
        const res = await getAllVerifyTypeData(params);
        if (res.ok) {
            await Dexie.delete("cpasCacheDb");
            const { data } = res;
            if (!data || (data && JSON.stringify(data) === "[]")) {
                setShowOpen(false);
                return message.success("重算成功！");
            }
            const { verifySummaryItemList, statistics, time, version, appVersion } = data;
            let sortVerifySummaryItemList = [];
            if (type !== "fs") {
                sortVerifySummaryItemList = await sortTreeByChildren(verifySummaryItemList);
                console.log(sortVerifySummaryItemList, "sortVerifySummaryItemList 处理数据展示");
            }
            const dbNameData = {
                dbname,
                ntotalData: statistics,
                ndataList: type === "fs" ? verifySummaryItemList : sortVerifySummaryItemList,
                otherInfo: {
                    time,
                    version,
                    appVersion,
                },
            };
            localStorage.setItem(`${storageName}-${dbname}`, JSON.stringify(dbNameData));
            setTotalData(statistics);
            setOtherData({
                time,
                version,
                appVersion,
            });
            const { formulars, noFormulas } = formatDataList(verifySummaryItemList);
            setDataList(formulars);
            setNoDataList(noFormulas);
            setShowOpen(false);
            await initReloadData();
            await reloadData();
            if (modileIsReturn) {
                modileIsReturn(true);
            }
            return message.success("重算成功！");
        }
        else {
            setShowOpen(false);
            return message.error(res.msg);
        }
    };
    //const menus = showDetailButtonCallback ? showDetailButtonCallback();
    const genExtra = (item) => {
        const menus = showDetailButtonMenus ? showDetailButtonMenus() : [];
        const title = item?.title;
        const detailButton = (_jsxs("div", { onClick: (event) => {
                // If you don't want click extra trigger collapse, you can prevent this:
                console.log("genExtra-item", item);
                if (type === "ds") {
                    openVerifyDetail({
                        ...item,
                    }, true);
                }
                else {
                    openVerifyDetail({
                        ...item,
                    });
                }
                event.stopPropagation();
                return false;
            }, children: ["\u8BE6\u60C5", _jsx(DoubleRightOutlined, {})] }));
        if (menus && menus.length && title) {
            let isVisible = false;
            for (let i = 0; i < menus.length; i++) {
                if (title.includes(menus[i])) {
                    isVisible = true;
                }
            }
            if (isVisible) {
                return detailButton;
            }
            else {
                return null;
            }
        }
        if (!menus || !menus.length) {
            return detailButton;
        }
    };
    function renderInfo(key, index, groupVerifyResult) {
        return (_jsxs("li", { className: "rules-list", children: [_jsxs("p", { children: [index + 1, "\u3001", RulesType[key]] }), groupVerifyResult.map((f) => {
                    if (f?.dynamicType !== "MAIN") {
                        return (_jsxs(_Fragment, { children: [_jsxs("p", { children: ["\u52FE\u7A3D\u5173\u7CFB", f.number, " \uFF1A", f.isForce ? (_jsx("div", { style: {
                                                width: 55,
                                                height: 22,
                                                backgroundColor: "#f50",
                                                display: "inline-block",
                                                textAlign: "center",
                                                color: "white",
                                                marginRight: 5,
                                            }, children: "\u5F3A\u5236" })) : (_jsx("div", { style: {
                                                width: 55,
                                                height: 22,
                                                backgroundColor: "#87d068",
                                                display: "inline-block",
                                                textAlign: "center",
                                                color: "white",
                                                marginRight: 5,
                                            }, children: "\u975E\u5F3A\u5236" })), formulaList(f)] }), _jsx("p", { children: f.fullFormula })] }));
                    }
                })] }, key));
    }
    function renderList() {
        if (!dataList || !dataList.length) {
            return;
        }
        const cloneData = _.cloneDeep(dataList);
        const menus = showDetailButtonMenus ? showDetailButtonMenus() : [];
        let groupDataByType = [];
        //合并系统列表需要支持按菜单规则传入的列表展示
        if (menus && menus.length && title) {
            cloneData.map((item) => {
                const title = item?.title;
                for (let i = 0; i < menus.length; i++) {
                    if (title.includes(menus[i])) {
                        const res = _.groupBy(item.verifyResult, "type");
                        groupDataByType.push({
                            ...item,
                            verifyResult: res,
                        });
                    }
                }
            });
        }
        //不传入菜单汇总默认展示全部（未审/审定/试算所有列表）
        if (!menus || !menus.length) {
            groupDataByType = cloneData.map((item) => {
                item.verifyResult = _.groupBy(item.verifyResult, "type");
                return item;
            });
        }
        return groupDataByType.length > 0 ? (_jsx(Collapse, { activeKey: activeKeyArr, onChange: changeActiveKey, children: groupDataByType.map((item) => {
                const verifyResult = item.verifyResult;
                let mainLen = 0;
                //@临时方案，总数需要减去母公式的数据
                if (verifyResult) {
                    Object.keys(verifyResult).map((key, index) => {
                        const mainVerifyResult = item.verifyResult[key]
                            ? item.verifyResult[key].filter((r) => r.dynamicType && r.dynamicType === "MAIN")
                            : null;
                        if (mainVerifyResult && mainVerifyResult.length) {
                            mainLen = mainLen + mainVerifyResult.length;
                        }
                    });
                }
                /*兼容处理公式没有匹配上的情况 begin*/
                const verifyKeys = Object.keys(item.verifyResult);
                // let isCludesKey = true; //默认可以匹配上
                if (selectedItems && selectedItems.length && verifyKeys) {
                    for (let i = 0; i < selectedItems.length; i++) {
                        if (!verifyKeys.includes(selectedItems[i])) {
                            return;
                        }
                    }
                }
                /*兼容处理公式没有匹配上的情况 end*/
                const total = mainLen
                    ? parseInt(item.statisticsItem.total) - mainLen
                    : item.statisticsItem.total;
                const vefiryResult = item.verifyResult;
                return (_jsx(Panel, { header: `${item.title}   共${total}条，校验不通过${item.statisticsItem.fail}条`, extra: genExtra(item), children: item.verifyResult ? (_jsx(_Fragment, { children: renderTable(vefiryResult, selectedItems) })) : (
                    // <ul>
                    //   {Object.keys(item.verifyResult)
                    //     .sort()
                    //     .map((key: any, index: any) => {
                    //       const groupVerifyResult = sortValidtorData(
                    //         item.verifyResult[key]
                    //       );
                    //       if (
                    //         selectedItems.length > 0 &&
                    //         selectedItems.includes(key)
                    //       ) {
                    //         return renderInfo(key, index, groupVerifyResult);
                    //       } else if (selectedItems.length === 0) {
                    //         return renderInfo(key, index, groupVerifyResult);
                    //       } else {
                    //         return null;
                    //       }
                    //     })}
                    // </ul>
                    _jsx("div", { className: "no-rules", children: "\u6682\u672A\u8BBE\u7F6E\u52FE\u7A3D\u6821\u9A8C" })) }, item.id || item.fid));
            }) })) : (_jsx("div", { className: "no-data", children: "\u6682\u65E0\u6570\u636E" }));
    }
    const reportClick = (e) => {
        console.log("input click");
        setReportModalOpen(true);
    };
    const reportClear = () => {
        setReportInputValue("");
        setReportChecks([]);
        reportTreeView?.current?.instance.unselectAll();
    };
    const treeViewSelectionChanged = (e) => {
        console.log("selection change");
        const treeView = e.component;
        const syncSelectedEmployees = treeView
            .getSelectedNodes()
            .map((node) => node.itemData.key);
        setReportChecks([...syncSelectedEmployees]);
    };
    const notesTreeViewSelectionChanged = (e) => {
        console.log("selection change");
        const treeView = e.component;
        const syncSelectedEmployees = treeView
            .getSelectedNodes()
            .map((node) => node.itemData.key);
        setNotesChecks([...syncSelectedEmployees]);
    };
    const renderTreeViewItem = (item) => `${item.title}`;
    const renderReport = () => {
        if (type === "fs") {
            return;
        }
        return (_jsxs(Form.Item, { label: "\u62A5\u8868\u9879\u76EE", name: "reportProject", children: [_jsx(Input, { onClick: reportClick, className: "report-project", value: ellipsis(reportInputValue, 7), placeholder: "\u8BF7\u9009\u62E9\u62A5\u8868\u9879\u76EE", style: { width: 120 } }), _jsx("span", { style: { display: "none" }, children: reportInputValue })] }));
    };
    const notesClick = () => {
        console.log("input click");
        setNotesModalOpen(true);
    };
    const renderSelectList = () => {
        if (type !== "fs") {
            return (_jsxs(Form.Item, { label: "\u62AB\u9732\u9879\u76EE", name: "reportList", children: [_jsx(Input, { onClick: notesClick, className: "report-project", value: ellipsis(notesInputValue, 7), placeholder: "\u8BF7\u9009\u62E9\u62AB\u9732\u9879\u76EE", style: { width: 120 } }), _jsx("span", { style: { display: "none" }, children: notesInputValue })] }));
        }
        return (_jsx(Form.Item, { label: type === "fs" ? "报表项目" : "披露项目", name: "reportList", children: _jsx(Select, { allowClear: true, showSearch: true, mode: "multiple", placeholder: type === "fs" ? "请选择报表项目" : "请选择披露项目", value: reportItem, style: { minWidth: "120px" }, onChange: onChangeReportPro, maxTagCount: 1, maxTagTextLength: 3, options: filteredReportOpation.map((item) => ({
                    value: item.title,
                    label: item.title,
                })) }) }));
    };
    //计算所有母公式的数据
    function calculateAllMain() {
        let mainLen = 0;
        if (!dataList || !dataList.length) {
            return mainLen;
        }
        const cloneData = _.cloneDeep(dataList);
        const groupDataByType = cloneData.map((item) => {
            item.verifyResult = _.groupBy(item.verifyResult, "type");
            return item;
        });
        if (!groupDataByType || !groupDataByType.length) {
            return mainLen;
        }
        groupDataByType.map((item) => {
            const verifyResult = item.verifyResult;
            //@临时方案，总数需要减去母公式的数据
            if (verifyResult) {
                Object.keys(verifyResult).map((key, index) => {
                    const mainVerifyResult = item.verifyResult[key]
                        ? item.verifyResult[key].filter((r) => r.dynamicType && r.dynamicType === "MAIN")
                        : null;
                    if (mainVerifyResult && mainVerifyResult.length) {
                        mainLen = mainLen + mainVerifyResult.length;
                    }
                });
            }
        });
        return mainLen;
    }
    useEffect(() => {
        if (type === "fs") {
            initFsTableData();
        }
        else {
            // getReportProject();
            getReportList();
        }
        initReloadData();
    }, []);
    const isTrue = sysName !== SystemName.MERGE ? isNotesModalOpen : false;
    useEffect(() => {
        if (type !== "fs") {
            getReportProject();
        }
    }, [activeTabKey]);
    useEffect(() => {
        reloadData();
    }, [reportInputValue, notesInputValue]);
    const allMainLen = calculateAllMain();
    const allTotal = allMainLen
        ? parseInt(totalData?.total) - allMainLen
        : totalData?.total; //兼容后端，减掉母公式数据。@todo后续配合后端需要还原
    return (_jsxs(_Fragment, { children: [_jsx(PageLoading, { isOpen: isLoading, isMaskClose: false, className: "art-page-loading", 
                // content={"勾稽汇总pdf生成中..."}
                width: 200 }), _jsxs("div", { className: "summary", children: [_jsx("h1", { className: "title", children: title }), _jsx("div", { className: "form", children: _jsxs(Row, { children: [_jsx(Col, { span: 18, children: _jsxs(Form, { layout: "inline", form: form, initialValues: {
                                            typeList: [],
                                            reportList: [],
                                            resultList: [],
                                            isShow: "open",
                                        }, children: [_jsx(Form.Item, { label: "\u6821\u9A8C\u7C7B\u578B", name: "typeList", children: _jsx(Select, { allowClear: true, mode: "multiple", placeholder: "\u8BF7\u9009\u62E9\u6821\u9A8C\u7C7B\u578B", value: selectedItems, style: { minWidth: "120px" }, onChange: (e) => onChangeRulesType(e), options: storageName === "fsNameData"
                                                        ? OPTIONS.slice(0, OPTIONS.length - 1)
                                                        : OPTIONS, maxTagCount: 2, maxTagTextLength: 3 }) }), renderSelectList(), renderReport(), _jsx(Form.Item, { label: "\u6821\u9A8C\u7ED3\u679C", name: "resultList", children: _jsx(Select
                                                // showSearch
                                                , { 
                                                    // showSearch
                                                    allowClear: true, mode: "multiple", placeholder: "\u8BF7\u9009\u62E9\u6821\u9A8C\u7ED3\u679C", value: resultItems, style: { minWidth: "120px" }, onChange: onChangeResult, maxTagCount: 2, maxTagTextLength: 3, options: RESULT_OPATIONS }) }), _jsx(Form.Item, { label: "\u5168\u90E8\u5206\u7EC4", name: "isShow", children: _jsx(Select, { allowClear: true, placeholder: "\u8BF7\u9009\u62E9", style: { maxWidth: "100px" }, onChange: handleChange, options: [
                                                        {
                                                            value: "open",
                                                            label: "展开",
                                                        },
                                                        {
                                                            value: "close",
                                                            label: "收起",
                                                        },
                                                    ] }) })] }) }), _jsxs(Col, { span: 6, className: "verify-button-box", children: [noFormulaTotal ? (_jsxs(Button, { size: "small", 
                                            // type="default"
                                            onClick: () => {
                                                voildModalRef?.current.show();
                                            }, style: { width: 100 + noFormulaTotal.toString().length * 14 }, children: [_jsx(InfoCircleOutlined, { style: { color: "orange" } }), noFormulaTotal, "\u6761\u65E0\u6548\u516C\u5F0F"] })) : null, _jsx(Button, { size: "small", type: "primary", onClick: rerunFun, children: "\u91CD\u7B97" }), _jsx(Button, { size: "small", type: "primary", onClick: async () => {
                                                // setIsLoading(true);
                                                // setTimeout(async () => {
                                                //   await exportFun();
                                                // }, 300);
                                                const electronComponents = window["electronComponents"];
                                                const dialogResult = await electronComponents["openDirectoryDialog"]();
                                                if (dialogResult.canceled) {
                                                    return;
                                                }
                                                exportElectronFun(dialogResult.filePaths[0]);
                                            }, children: "\u5BFC\u51FA" })] })] }) }), _jsx("div", { className: "content-all-box", children: _jsx("div", { className: "content-all", children: _jsxs("div", { ref: treeRef, children: [_jsxs("div", { className: "total-all", children: [_jsxs("div", { children: ["\u7EDF\u8BA1\uFF1A\u5171", totalData?.total || 0, "\u6761, \u6821\u9A8C\u4E0D\u901A\u8FC7", totalData?.fail || 0, "\u6761\uFF0C \u5176\u4E2D\u5F3A\u5236\u6821\u9A8C\u4E0D\u901A\u8FC7", totalData?.force_fail || 0, "\u6761\uFF0C \u975E\u5F3A\u5236\u6821\u9A8C\u4E0D\u901A\u8FC7", totalData?.not_force_fail || 0, "\u6761\u3002"] }), _jsx("div", { children: otherData?.time
                                                    ? `上次执行重算时间：${otherData?.time}`
                                                    : "" })] }), renderList()] }) }) }), _jsx(Modal, { title: "\u62A5\u8868\u9879\u76EE", open: isReportModalOpen, destroyOnClose: true, maskClosable: false, cancelText: "\u6E05\u7A7A\u6761\u4EF6", closable: false, onCancel: async () => {
                            if (reportTreeView) {
                                reportTreeView?.current?.instance.unselectAll();
                            }
                            setReportChecks([]);
                            setReportInputValue("");
                            setReportModalOpen(false);
                            // reloadData();
                        }, onOk: () => {
                            setReportInputValue(reportChecks.join(","));
                            setReportModalOpen(false);
                            reloadData();
                        }, children: _jsx("div", { style: { height: "50vh", overflow: "auto" }, children: _jsx(TreeView, { id: "treeviewReportProject", showCheckBoxesMode: "normal", expandedExpr: "expanded", selectNodesRecursive: false, searchEnabled: true, ref: reportTreeView, selectionMode: "multiple", selectByClick: true, onSelectionChanged: treeViewSelectionChanged, 
                                // onItemSelectionChanged={onItemSelectionChanged}
                                displayExpr: "title", itemRender: renderTreeViewItem, items: sysName !== SystemName.MERGE
                                    ? reportDataSource
                                    : mergeReportResult, virtualModeEnabled: true }) }) }), _jsx(Modal, { title: "\u62AB\u9732\u9879\u76EE", open: isNotesModalOpen, destroyOnClose: true, maskClosable: false, cancelText: "\u6E05\u7A7A\u6761\u4EF6", closable: false, onCancel: async () => {
                            if (notesTreeView) {
                                notesTreeView?.current?.instance.unselectAll();
                            }
                            setNotesChecks([]);
                            setNotesInputValue("");
                            setNotesModalOpen(false);
                            // reloadData();
                        }, onOk: () => {
                            setNotesInputValue(notesChecks.join(","));
                            setNotesModalOpen(false);
                            reloadData();
                        }, children: _jsx("div", { style: { height: "50vh", overflow: "auto" }, children: _jsx(TreeView, { id: "treeviewNotes", showCheckBoxesMode: "normal", expandedExpr: "expanded", selectNodesRecursive: false, searchEnabled: true, ref: notesTreeView, dataStructure: "plain", 
                                // ref={leftTreeRef}
                                parentIdExpr: "parentId", selectionMode: "multiple", selectByClick: true, onSelectionChanged: notesTreeViewSelectionChanged, displayExpr: "title", keyExpr: "id", 
                                // onItemSelectionChanged={onItemSelectionChanged}
                                itemRender: renderTreeViewItem, items: reportResult, virtualModeEnabled: true }) }) }), _jsxs(Modal, { open: isShowOpen, footer: null, centered: true, maskClosable: false, closable: false, title: null, bodyStyle: { background: "none" }, 
                        // style={{ height: "200px" }}
                        className: "dot-body", wrapClassName: "spin-example", children: [_jsx(Progress, { percent: percentNum, status: "active", style: { color: "#fff" } }), _jsx("div", { className: "process-content", children: contentMsg })] }), _jsxs(Modal, { open: isShowExportProcess, footer: null, centered: true, maskClosable: false, closable: false, title: null, bodyStyle: { background: "none" }, 
                        // style={{ height: "200px" }}
                        className: "dot-body", wrapClassName: "spin-example", children: [_jsx(Progress, { percent: exportProcess, status: "active", style: { color: "#fff" } }), _jsx("div", { className: "process-content", children: exportMsg })] }), _jsx(ValidModal, { dataList: noDataList, width: 1000, ref: voildModalRef })] })] }));
};
export default VerifySummary;
